<?php

/**
* @current cmsadminusers.php
* @author   LiuYang <liu_yang@haibao.com>
* @date 2017年3月3日 上午11:11:58
*/
namespace haibao\jiepai\data;

class CmsAdminUsers extends \haibao\jiepai\data\BaseMysql{

    public function __construct(){
        parent::__construct('\haibao\cms\model\data\Guise');
        $this->setConfig( \haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_MYSQL_HAIBAO_CMS );
    }
    public function isEditorUser($userId){
        $sql = 'select count(*) as count from Guise where GuiseId=%s';
        $result = $this->query($sql, array($userId))->fetch_assoc();
        if($result){
            return $result['count'];
        }
        return 0;
    }
}
